home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 May / SGI IRIX 6.5 Complementary Applications 2004 May.iso / dist / PPRO.idb / usr / include / cups / language.h.z / language.h
Encoding:
C/C++ Source or Header  |  2004-01-20  |  5.1 KB  |  229 lines

  1. /*
  2.  * "$Id: language.h,v 1.31 2003/10/31 23:10:17 mike Exp $"
  3.  *
  4.  *   Multi-language support for the Common UNIX Printing System (CUPS).
  5.  *
  6.  *   Copyright 1997-2003 by Easy Software Products.
  7.  *
  8.  *   These coded instructions, statements, and computer programs are the
  9.  *   property of Easy Software Products and are protected by Federal
  10.  *   copyright law.  Distribution and use rights are outlined in the file
  11.  *   "LICENSE.txt" which should have been included with this file.  If this
  12.  *   file is missing or damaged please contact Easy Software Products
  13.  *   at:
  14.  *
  15.  *       Attn: CUPS Licensing Information
  16.  *       Easy Software Products
  17.  *       44141 Airport View Drive, Suite 204
  18.  *       Hollywood, Maryland 20636-3111 USA
  19.  *
  20.  *       Voice: (301) 373-9603
  21.  *       EMail: cups-info@cups.org
  22.  *         WWW: http://www.cups.org
  23.  *
  24.  *   This file is subject to the Apple OS-Developed Software exception.
  25.  */
  26.  
  27. #ifndef _CUPS_LANGUAGE_H_
  28. #  define _CUPS_LANGUAGE_H_
  29.  
  30. /*
  31.  * Include necessary headers...
  32.  */
  33.  
  34. #  include <locale.h>
  35.  
  36. #  ifdef __cplusplus
  37. extern "C" {
  38. #  endif /* __cplusplus */
  39.  
  40. /*
  41.  * Messages...
  42.  */
  43.  
  44. typedef enum            /**** Message Indices ****/
  45. {
  46.   CUPS_MSG_OK,
  47.   CUPS_MSG_CANCEL,
  48.   CUPS_MSG_HELP,
  49.   CUPS_MSG_QUIT,
  50.   CUPS_MSG_CLOSE,
  51.   CUPS_MSG_YES,
  52.   CUPS_MSG_NO,
  53.   CUPS_MSG_ON,
  54.   CUPS_MSG_OFF,
  55.   CUPS_MSG_SAVE,
  56.   CUPS_MSG_DISCARD,
  57.   CUPS_MSG_DEFAULT,
  58.   CUPS_MSG_OPTIONS,
  59.   CUPS_MSG_MORE_INFO,
  60.   CUPS_MSG_BLACK,
  61.   CUPS_MSG_COLOR,
  62.   CUPS_MSG_CYAN,
  63.   CUPS_MSG_MAGENTA,
  64.   CUPS_MSG_YELLOW,
  65.   CUPS_MSG_COPYRIGHT,
  66.   CUPS_MSG_GENERAL,
  67.   CUPS_MSG_PRINTER,
  68.   CUPS_MSG_IMAGE,
  69.   CUPS_MSG_HPGL2,
  70.   CUPS_MSG_EXTRA,
  71.   CUPS_MSG_DOCUMENT,
  72.   CUPS_MSG_OTHER,
  73.   CUPS_MSG_PRINT_PAGES,
  74.   CUPS_MSG_ENTIRE_DOCUMENT,
  75.   CUPS_MSG_PAGE_RANGE,
  76.   CUPS_MSG_REVERSE_ORDER,
  77.   CUPS_MSG_PAGE_FORMAT,
  78.   CUPS_MSG_1_UP,
  79.   CUPS_MSG_2_UP,
  80.   CUPS_MSG_4_UP,
  81.   CUPS_MSG_IMAGE_SCALING,
  82.   CUPS_MSG_USE_NATURAL_IMAGE_SIZE,
  83.   CUPS_MSG_ZOOM_BY_PERCENT,
  84.   CUPS_MSG_ZOOM_BY_PPI,
  85.   CUPS_MSG_MIRROR_IMAGE,
  86.   CUPS_MSG_COLOR_SATURATION,
  87.   CUPS_MSG_COLOR_HUE,
  88.   CUPS_MSG_FIT_TO_PAGE,
  89.   CUPS_MSG_SHADING,
  90.   CUPS_MSG_DEFAULT_PEN_WIDTH,
  91.   CUPS_MSG_GAMMA_CORRECTION,
  92.   CUPS_MSG_BRIGHTNESS,
  93.   CUPS_MSG_ADD,
  94.   CUPS_MSG_DELETE,
  95.   CUPS_MSG_MODIFY,
  96.   CUPS_MSG_PRINTER_URI,
  97.   CUPS_MSG_PRINTER_NAME,
  98.   CUPS_MSG_PRINTER_LOCATION,
  99.   CUPS_MSG_PRINTER_INFO,
  100.   CUPS_MSG_PRINTER_MAKE_AND_MODEL,
  101.   CUPS_MSG_DEVICE_URI,
  102.   CUPS_MSG_FORMATTING_PAGE,
  103.   CUPS_MSG_PRINTING_PAGE,
  104.   CUPS_MSG_INITIALIZING_PRINTER,
  105.   CUPS_MSG_PRINTER_STATE,
  106.   CUPS_MSG_ACCEPTING_JOBS,
  107.   CUPS_MSG_NOT_ACCEPTING_JOBS,
  108.   CUPS_MSG_PRINT_JOBS,
  109.   CUPS_MSG_CLASS,
  110.   CUPS_MSG_LOCAL,
  111.   CUPS_MSG_REMOTE,
  112.   CUPS_MSG_DUPLEXING,
  113.   CUPS_MSG_STAPLING,
  114.   CUPS_MSG_FAST_COPIES,
  115.   CUPS_MSG_COLLATED_COPIES,
  116.   CUPS_MSG_PUNCHING,
  117.   CUPS_MSG_COVERING,
  118.   CUPS_MSG_BINDING,
  119.   CUPS_MSG_SORTING,
  120.   CUPS_MSG_SMALL,
  121.   CUPS_MSG_MEDIUM,
  122.   CUPS_MSG_LARGE,
  123.   CUPS_MSG_VARIABLE,
  124.   CUPS_MSG_IDLE,
  125.   CUPS_MSG_PROCESSING,
  126.   CUPS_MSG_STOPPED,
  127.   CUPS_MSG_ALL,
  128.   CUPS_MSG_ODD,
  129.   CUPS_MSG_EVEN_PAGES,
  130.   CUPS_MSG_DARKER_LIGHTER,
  131.   CUPS_MSG_MEDIA_SIZE,
  132.   CUPS_MSG_MEDIA_TYPE,
  133.   CUPS_MSG_MEDIA_SOURCE,
  134.   CUPS_MSG_ORIENTATION,
  135.   CUPS_MSG_PORTRAIT,
  136.   CUPS_MSG_LANDSCAPE,
  137.   CUPS_MSG_JOB_STATE,
  138.   CUPS_MSG_JOB_NAME,
  139.   CUPS_MSG_USER_NAME,
  140.   CUPS_MSG_PRIORITY,
  141.   CUPS_MSG_COPIES,
  142.   CUPS_MSG_FILE_SIZE,
  143.   CUPS_MSG_PENDING,
  144.   CUPS_MSG_OUTPUT_MODE,
  145.   CUPS_MSG_RESOLUTION,
  146.   CUPS_MSG_TEXT,
  147.   CUPS_MSG_PRETTYPRINT,
  148.   CUPS_MSG_MARGINS,
  149.   CUPS_MSG_LEFT,
  150.   CUPS_MSG_RIGHT,
  151.   CUPS_MSG_BOTTOM,
  152.   CUPS_MSG_TOP,
  153.   CUPS_MSG_FILENAME,
  154.   CUPS_MSG_PRINT,
  155.   CUPS_MSG_OPTIONS_INSTALLED,
  156.   CUPS_MSG_AUTO,
  157.   CUPS_MSG_HTTP_BASE = 200,
  158.   CUPS_MSG_HTTP_END = 505,
  159.   CUPS_MSG_MAX
  160. } cups_msg_t;
  161.  
  162. typedef enum            /**** Language Encodings ****/
  163. {
  164.   CUPS_AUTO_ENCODING = -1,
  165.   CUPS_US_ASCII,
  166.   CUPS_ISO8859_1,
  167.   CUPS_ISO8859_2,
  168.   CUPS_ISO8859_3,
  169.   CUPS_ISO8859_4,
  170.   CUPS_ISO8859_5,
  171.   CUPS_ISO8859_6,
  172.   CUPS_ISO8859_7,
  173.   CUPS_ISO8859_8,
  174.   CUPS_ISO8859_9,
  175.   CUPS_ISO8859_10,
  176.   CUPS_UTF8,
  177.   CUPS_ISO8859_13,
  178.   CUPS_ISO8859_14,
  179.   CUPS_ISO8859_15,
  180.   CUPS_WINDOWS_874,
  181.   CUPS_WINDOWS_1250,
  182.   CUPS_WINDOWS_1251,
  183.   CUPS_WINDOWS_1252,
  184.   CUPS_WINDOWS_1253,
  185.   CUPS_WINDOWS_1254,
  186.   CUPS_WINDOWS_1255,
  187.   CUPS_WINDOWS_1256,
  188.   CUPS_WINDOWS_1257,
  189.   CUPS_WINDOWS_1258,
  190.   CUPS_KOI8_R,
  191.   CUPS_KOI8_U
  192. } cups_encoding_t;
  193.  
  194. typedef struct cups_lang_str    /**** Language Cache Structure ****/
  195. {
  196.   struct cups_lang_str    *next;        /* Next language in cache */
  197.   int            used;        /* Number of times this entry has been used. */
  198.   cups_encoding_t    encoding;    /* Text encoding */
  199.   char            language[16];    /* Language/locale name */
  200.   char            *messages[CUPS_MSG_MAX];
  201.                     /* Message array */
  202. } cups_lang_t;
  203.  
  204.  
  205. /*
  206.  * Prototypes...
  207.  */
  208.  
  209. #  define        cupsLangDefault() cupsLangGet(NULL)
  210. extern char        *cupsLangEncoding(cups_lang_t *lang);
  211. extern void        cupsLangFlush(void);
  212. extern void        cupsLangFree(cups_lang_t *lang);
  213. extern cups_lang_t    *cupsLangGet(const char *language);
  214. #  define        cupsLangString(lang,msg) (lang)->messages[(msg)]
  215.  
  216. /**** New in CUPS 1.1.20 ****/
  217. extern void        _cupsRestoreLocale(int category, char *oldlocale);
  218. extern char        *_cupsSaveLocale(int category, const char *locale);
  219.  
  220. #  ifdef __cplusplus
  221. }
  222. #  endif /* __cplusplus */
  223.  
  224. #endif /* !_CUPS_LANGUAGE_H_ */
  225.  
  226. /*
  227.  * End of "$Id: language.h,v 1.31 2003/10/31 23:10:17 mike Exp $".
  228.  */
  229.